﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AggregateRoot.Console
{
    public class Order_Basic_CRUD_Test
    {
        public static void CreateOrder()
        {
            OrderRepository orderRep = new OrderRepository();
            
            Order order = new Order();
            
            orderRep.Add(order);
            orderRep.Save();

        }

        public static void UpdateOrder()
        {
            OrderRepository orderRep = new OrderRepository();

            Order order = orderRep.GetByOrderId(11079);
            order.OrderDate = DateTime.Now;
            orderRep.Save();

        }


        public static void DeleteOrder()
        {
            OrderRepository orderRep = new OrderRepository();
            Order order = orderRep.GetByOrderId(11079);
            orderRep.Delete(order);
            orderRep.Save();
        }
    }
}
